<template>
  <div>
    <!-- 头部tab -->
    <!-- <div class="top_tab">
      <div class="left" @click="back()">
        <img  src="../assets/order_center/shangs.png">
      </div>
      <span>管理</span>
      <div class="right">
      </div>
    </div> -->
    <div class="list">
			<div class="info">
				<div class="left">
					<span>储蓄卡（尾号{{num.substring(num.length-4)}}）</span>
				</div>
				<div class="right">
					<span @click="remov()">解除绑定</span>
				</div>
    	</div>
		</div>
  </div>
</template>

<script>
export default {
  name: 'remove',
  data () {
    return {
    }
  },
  methods:{
    
    back: function() {
      this.$router.go(-1);
	},
    
    remov(){
      let self = this;
      let url = "/api/bank_card/del";
			self.httpPost(url,{user_id:this.myid,token:this.token,card_id:this.id},function(res) {
				if (res.code == 200) { 
				 	self.$dialog.toast({mes:res.msg});
          setTimeout(() => {
						self.back(); 
					}, 1000); 
				}else{
				 	self.$dialog.toast({mes:res.msg});
        }
      })
    }
  },
  created(){
			document.title = "管理";
			this.token = localStorage.getItem('mytoken');
      this.myid = localStorage.getItem('myid'); 
      this.id = this.$route.query.yid;  
      this.num = this.$route.query.num;  
		},
}
</script>


<style scoped>
.top_tab{
  width:100%;
  padding:.2rem .3rem;
  background: #FFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: .01rem .01rem .06rem #ddd;
  margin-bottom: .01rem;
}
.top_tab span{
  color:#333;
  font-size: .36rem;
}
.top_tab .right{
	width: 1rem;
	display: flex;
	justify-content: space-between;
}
.top_tab  img{
  width:.43rem;
}
.list{
	width:100%;
}
.list .info{
  width:100%;
  background: #FFF;
  padding: .3rem .3rem;
	display: flex;
	justify-content: space-between;
}
.list .info .left span{
	font-size: .28rem;
	color:#333;
}
.list .info .right span{
	font-size: .28rem;
	color:#e63f3f;
}
</style>
